package icu.sehnen.zuul.feign;

import icu.sehnen.common.result.CommonResult;
import icu.sehnen.common.result.Permission;
import icu.sehnen.zuul.feign.fallback.UserFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "user",fallback = UserFallBack.class)
public interface UserFeign {

    @GetMapping("/user/checkAccessToUri")
    CommonResult checkAccessToUri(@RequestParam("uri") String uri, @RequestParam("username") String username);
    @GetMapping("/user/permission/list")
    CommonResult<List<Permission>> getPermission();
}